﻿using System;
namespace DX
{
    public interface ICacheProvider
    {
        bool TryGet<T>(string key, out T value);
        T GetOrAdd<T>(string key, Func<T> func);
        T GetOrAdd<T>(string key, Func<T> func, TimeSpan expiration);
        T GetOrAddSliding<T>(string key, Func<T> func, TimeSpan expiration);
        void Set(string key, object value);
      
        void Set(string key, object value, TimeSpan expiration);
        void SetSliding(string key, object value, TimeSpan expiration);
   
    }


}